package com.lanchetech.dao;

import com.lanchetech.entity.OrderDiscount;
import java.util.Date;import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface OrderDiscountMapper {
    int deleteByPrimaryKey(Long id);

    int insert(OrderDiscount record);

    int insertSelective(OrderDiscount record);

    OrderDiscount selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(OrderDiscount record);

    int updateByPrimaryKey(OrderDiscount record);

    int updateBatch(List<OrderDiscount> list);

    int updateBatchSelective(List<OrderDiscount> list);

    int batchInsert(@Param("list") List<OrderDiscount> list);

    List<OrderDiscount> findAllByOrderId(@Param("orderId") Long orderId);

    int updateStatusAndUpdatedAtByOrderId(@Param("updatedStatus") Byte updatedStatus, @Param("updatedUpdatedAt") Date updatedUpdatedAt, @Param("orderId") Long orderId);

    OrderDiscount findOneByOrderIdAndType(@Param("orderId")Long orderId,@Param("type")String type);




}